(function(){

'use strict';

angular.module('controllers.faultLocation.pbossOm')
  .controller('PBOSSController', PBOSSController);

function PBOSSController($scope, pbossOmServer, reponsestate, requeststate, COREDATA, CoreService,$filter) {
  $scope.shoumun = 0;
  pbossOmServer.querypbooss();
  $scope.items = reponsestate.pboss;
  //查询条件参数数据类型
  $scope.dateTypes = [{
    tradTypeName: '数据一致性',
    tradTypeCode: '01'
  }, {
    tradTypeName: 'EC信息同步',
    tradTypeCode: '01'
  }, {
    tradTypeName: 'EC企业产品订购',
    tradTypeCode: '01'
  }, {
    tradTypeName: 'EC成员产品订购',
    tradTypeCode: '01'
  }, {
    tradTypeName: '号码信息同步',
    tradTypeCode: '01'
  }, {
    tradTypeName: '制卡订单受理',
    tradTypeCode: '01'
  }];

  $scope.launchPlatforms = [{
    launchPlatformName: '省BOSS系统',
    launchPlatformCode: '01'
  }, {
    launchPlatformName: '联网',
    launchPlatformCode: '01'
  }, {
    launchPlatformName: 'B-BOSS',
    launchPlatformCode: '01'
  }, {
    launchPlatformName: '内容计费结算系统',
    launchPlatformCode: '01'
  }, {
    launchPlatformName: '全网物联网运管平台',
    launchPlatformCode: '01'
  }, {
    launchPlatformName: '物联网业务网关',
    launchPlatformCode: '01'
  }, {
    launchPlatformName: '中央SISM',
    launchPlatformCode: '01'
  }, {
    launchPlatformName: 'HLR',
    launchPlatformCode: '01'
  }, ];
  $scope.landingPlatforms = [{
    landingPlatformName: '省BOSS系统',
    landingPlatformCode: '01'
  }, {
    landingPlatformName: '物联网',
    landingPlatformCode: '01'
  }, {
    landingPlatformName: 'B-BOSS',
    landingPlatformCode: '01'
  }, {
    landingPlatformName: '内容计费结算系统',
    landingPlatformCode: '01'
  }, {
    landingPlatformName: '全网物联网运管平台',
    landingPlatformCode: '01'
  }, {
    landingPlatformName: '物联网业务网关',
    landingPlatformCode: '01'
  }, {
    landingPlatformName: '物联网业务平台',
    landingPlatformCode: '01'
  }, {
    landingPlatformName: '中央SISM',
    landingPlatformCode: '01'
  }, {
    landingPlatformName: 'HLR',
    landingPlatformCode: '01'
  }];
  $scope.launchAgencys = [{
    launchAgencName: '全部',
    launchAgencCode: '01'
  }, {
    launchAgencName: '广东',
    launchAgencCode: '02'
  }, {
    launchAgencName: '华为HLR',
    launchAgencCode: '03'
  }, {
    launchAgencName: '上海',
    launchAgencCode: '04'
  }, {
    launchAgencName: '辽宁',
    launchAgencCode: '05'
  }];
  $scope.landingAgencys = [{
    landingAgencyName: '全部',
    landingAgencyCode: '01'
  }, {
    landingAgencyName: '华为HLR',
    landingAgencyCode: '03'
  }, {
    landingAgencyName: '上海',
    landingAgencyCode: '04'
  }, {
    landingAgencyName: '辽宁',
    landingAgencyCode: '05'
  }];
 
  $scope.pboss=requeststate.pboss;

  $scope.queryAllChannel = function() {
    $scope.shoumun = $scope.shoumun === 1 ? 0 : 1;
    if ($scope.shoumun === 0) {
      pbossOmServer.querypbooss();
      $scope.items = reponsestate.pboss;
    }
  };

   $scope.ExportList={};
  $scope.excelExport =  COREDATA.FORMPREFIX+ 'OMdisplay/PBossOM/systemTrade/PBOSS/export';
  $scope.ExportList.startTime = $filter('date')(requeststate.pboss.startTime,'yyyy-MM-dd');
  $scope.ExportList.endTime = $filter('date')(requeststate.pboss.endTime,'yyyy-MM-dd');
  $scope.ExportList.title = '分平台统计结果'+$filter('date')(requeststate.pboss.startTime,'yyyy-MM-dd');;+'至'+ $filter('date')(requeststate.pboss.startTime,'yyyy-MM-dd');

  //吴尧
  var spans = ['/businessDetail', '/userStatus', '/orderRelation', '/serviceOpen', '/productManagement'];
  $scope.selectedIndex = CoreService.navgit(spans);

}
PBOSSController.$inject = ['$scope', 'pbossOmServer', 'reponsestate', 'requeststate', 'COREDATA', 'CoreService','$filter'];

})();